package ceshiren;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

public class CreateApartPage extends BasePage{
    private final By addbutton=By.name("name");
    private final By apartbutton=By.cssSelector(".js_parent_party_name ");
    private final By apartcategory=By.xpath("//*[@class='jstree-anchor'][text()='测试学习']");
    private final By submit=By.cssSelector("[d_ck='submit']");

    public CreateApartPage(WebDriver basedriver) {
        super(basedriver);
    }
    public AddressbookPage addApart(String apartname){
        find(addbutton).sendKeys(apartname);
        find(apartbutton).click();
        find(apartcategory).click();
        find(submit).click();
        return new AddressbookPage(driver);
    }
}
